-- GENERATED SPELL FOR [Spitting Cobra] --


function spell0_29774(pUnit, Event) --@Cobra Strike,n/a--
pUnit:FullCastSpellOnTarget(55703,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29774', 2000, 1)
end

function spell1_29774(pUnit, Event) --@Cobra Strike,n/a--
pUnit:FullCastSpellOnTarget(59020,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29774', 2000, 1)
end

function spell2_29774(pUnit, Event) --@Venom Spit,n/a--
pUnit:FullCastSpellOnTarget(55700,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29774', 12000, 1)
end

function spell3_29774(pUnit, Event) --@Venom Spit,n/a--
pUnit:FullCastSpellOnTarget(59019,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29774', 10000, 1)
end

function Sorts_29774(pUnit, Event)
local choix_sorts_29774 = math.random(0, 3)
if choix_sorts_29774 == 0 then
pUnit:RegisterEvent('spell0_29774', 1, 1)
end
if choix_sorts_29774 == 1 then
pUnit:RegisterEvent('spell1_29774', 1, 1)
end
if choix_sorts_29774 == 2 then
pUnit:RegisterEvent('spell2_29774', 1, 1)
end
if choix_sorts_29774 == 3 then
pUnit:RegisterEvent('spell3_29774', 1, 1)
end
end

function mob29774_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29774', math.random(1500, 3000), 1)
end

function mob29774_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29774_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29774_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29774, 1, 'mob29774_Action')
RegisterUnitEvent(29774, 2, 'mob29774_Leave')
RegisterUnitEvent(29774, 3, 'mob29774_Kill')
RegisterUnitEvent(29774, 4, 'mob29774_Die')
